<!--{include(pe_tpl('header_dialog.html'));}-->
<div class="tixing corg">【商品优惠】减价50元：请输入 -50；&nbsp;加价50元，请输入+50。</div>
<form method="post" id="form" autocomplete="off">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="list mat10">
<tr>
	<th class="bgtt" width="50"></th>
	<th class="bgtt" width="">商品详情</th>
	<th class="bgtt" width="81">单价(元)</th>
	<th class="bgtt" width="81">数量</th>
	<th class="bgtt" width="81">小计</th>
	<th class="bgtt" width="81">商品优惠</th>
	<th class="bgtt" width="91">运费</th>
	<!--<td class="bgtt" width="100" style="border-top:0">实付款(元)</td>-->	
</tr>
</table>
<table border="0" cellspacing="0" cellpadding="0" class="list">
<!--{foreach($product_list as $k=>$v):}-->
<!--{$product_allmoney = pe_num($v['product_money']*$v['product_num'], 'round', 1);}-->
<!--{$product_jjmoney = $v['product_jjmoney'] > 0 ? '+'.$v['product_jjmoney'] : $v['product_jjmoney']}-->
<tr>
	<td width="50"><img src="{pe_thumb($v['product_logo'], 100, 100)}" width="50" height="50" class="imgbg"></td>
	<td class="left">
		<a href="{pe_url('product-'.$v['product_id'])}" target="_blank" class="cblue">{$v['product_name']}</a>
		<p class="mat10">{order_skushow($v['product_rule'], 'html')}<!--{if($v['huodong_tag']):}--><span class="tag_red">{$v['huodong_tag']}</span><!--{endif;}--></p>
	</td>
	<td width="80">{$v['product_money']}</td>
	<td width="80">{$v['product_num']}</td>
	<td width="80">{$product_allmoney}</td>
	<td width="80"><input type="text" name="product_jjmoney[{$v['orderdata_id']}]" value="{$product_jjmoney}" product_allmoney="{$product_allmoney}" class="js_product_jjmoney inputtext input40" /></td>
	<!--{if($k==0):}-->
	<td width="90" rowspan="{count($product_list)}"><input type="text" name="order_wl_money" value="{pe_num($info['order_wl_money'], 'round', 1)}" class="inputtext input40" id="wl_money" /></td>
	<!--<td width="106" rowspan="{count($product_list)}" style="border-left:1px solid #eee;">
		<span class="strong num font14 corg" id="order_money">{round($info['order_money'], 1)}</span>
	</td>-->
	<!--{endif;}-->
</tr>
<!--{endforeach;}-->
</table>
<div class="dingdan_jiesuan" style="padding:10px 20px 10px 0; background:#f8f8f8;font-size:13px">
	<!--{if($info['order_point_get']):}-->
	<div class="dingdan_jiesuan_l">可获得积分：<span class="cgreen num">{$info['order_point_get']}</span> 点</div>
	<!--{endif;}-->
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td>商品金额：</td>
		<td width="100" id="order_product_money">¥ {$info['order_product_money']}</td>
	</tr>
	<tr>
		<td>运费：</td>
		<td id="order_wl_money">¥ {$info['order_wl_money']}</td>
	</tr>
	<!--{if($info['order_quan_money']>0):}-->
	<tr>
		<td>使用优惠券：</td>
		<td><a href="javascript:;" title="{$info['order_quan_name']}" class="cblue">- ¥ {$info['order_quan_money']}</a></td>
	</tr>
	<!--{endif;}-->
	<!--{if($info['order_point_money']>0):}-->
	<tr>
		<td>使用积分：</td>
		<td><a href="javascript:;" title="使用{$info['order_point_use']}积分" class="cblue">- ¥ {$info['order_point_money']}</a></td>
	</tr>
	<!--{endif;}-->
	<tr>
		<td>应付金额：</td>
		<td class=" cred strong" id="order_money">¥ {$info['order_money']}</td>
	</tr>
	</table>
	<div class="clear"></div>
</div>
<div style="height:60px"></div>
<div class="right_bottom center">
	<input type="hidden" name="pe_token" value="{$pe_token}" />
	<input type="hidden" name="pesubmit" value="{$pe_token}" />
	<input type="button" value="提 交" class="tjbtn">
</div>
</form>
<script type="text/javascript">
$(function(){
	$(".js_product_jjmoney").add("#wl_money").keyup(function(){
		var product_money = 0, wl_money = 0;
		$(".js_product_jjmoney").each(function(i){
			product_money += pe_num($(this).attr("product_allmoney"), 'round', 1) + pe_num($(this).val(), 'round', 1);
		})
		product_money = pe_num(product_money, 'round', 1);		
		wl_money = pe_num($("#wl_money").val(), 'round', 1);
		var order_money = product_money + wl_money - parseFloat({$info['order_quan_money']}) - parseFloat({$info['order_point_money']});
		order_money = pe_num(order_money, 'round', 1);
		if (order_money < 0) order_money = 0;
		product_money = pe_num(product_money, 'round', 1, true);
		wl_money = pe_num(wl_money, 'round', 1, true);
		order_money = pe_num(order_money, 'round', 1, true);
		$("#order_product_money").html("¥ " + product_money);
		$("#order_wl_money").html("¥ " + wl_money);
		$("#order_money").html("¥ " + order_money);
	});
	$(":button").click(function(){
		pe_submit("{pe_nowurl()}", function(json){
			if (json.code == 1) pe_open('dialog', 600);
		});
	})
})
</script>
<!--{include(pe_tpl('footer_dialog.html'));}-->